package top.finen.miniweapp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import top.finen.miniweapp.entity.WxUser;
import top.finen.miniweapp.service.WxUserService;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/api_v1/user")
public class WxUserController {

    @Autowired
    WxUserService wxUserService;

    @RequestMapping("/test")
    @ResponseBody
    public Map test() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("test", "test");
        return map;
    }

    @RequestMapping("/register")
    public void userRegister() {
        WxUser user = new WxUser();
        wxUserService.registerUser(user);
    }
}
